package DAO;

import javax.persistence.EntityManager;

import Entity.Company;

public class CompanyDAO {

	private CompanyDAO() {
	}

	public static void create(Company nuevo, EntityManager em) {
		em.persist(nuevo);
	}

	public static Company read(Company par, EntityManager em) {
		return em.find(par.getClass(), par.getId());
	}

	public static void update(Company old, EntityManager em) {
		em.merge(old);
	}

	public static void delete(Company market, EntityManager em) {
		em.remove(market);
	}

}
